<template>
  <div class="page-container">
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="学生姓名">
        <el-input
          v-model="formInline.stuName"
          placeholder="输入学生姓名"
          clearable
        />
      </el-form-item>
      <el-form-item label="市场部">
        <el-select v-model="formInline.origin" placeholder="Select" clearable>
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="学院">
        <el-select
          v-model="formInline.collegeId"
          placeholder="请选择"
          clearable
        >
          <el-option label="游戏学院" :value="1" />
          <el-option label="云计算学院" :value="2" />
        </el-select>
      </el-form-item>
      <el-form-item label="工作城市">
        <el-select
          v-model="formInline.workCity"
          placeholder="选择城市"
          clearable
        >
          <el-option
            v-for="item in cityOpions"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script setup>
/**
 * 模块引入
 */
import { reactive, ref } from "vue";
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const route = useRoute();
/**
 * 数据
 */
const formInline = reactive({});
const options = [
  {
    value: "招生办",
    label: "招生办",
  },
  {
    value: "辽宁市场部",
    label: "辽宁市场部",
  },
  {
    value: "黑北市场部",
    label: "黑北市场部",
  },
  {
    value: "冀北市场部",
    label: "冀北市场部",
  },
  {
    value: "豫中市场部",
    label: "豫中市场部",
  },
];
const cityOpions = [
  {
    label: "北京市",
    value: "1100",
  },
  {
    label: "长春市",
    value: "2201",
  },
  {
    label: "南京市",
    value: "3201",
  },
  {
    label: "黄浦区",
    value: "3101",
  },
  {
    label: "上海市",
    value: "3100",
  },
];
/**
 * 功能方法
 */
const emit = defineEmits(["handleForm"]);
const onSubmit = () => {
  emit("handleForm", formInline);
};
</script>
<style lang='scss' scoped>
.page-container {
}
</style>